#include <gui/model/Model.hpp>
#include <gui/model/ModelListener.hpp>
extern "C"
{
#include "user_include.h"
}
Model::Model() : modelListener(0)
{
}

void Model::tick()
{
    static int32_t tick1 = 0;
    static int32_t table[4] = {12, 34, 2, 23};
    int8_t i = 0;
#if 0
    if (tick1++ >= 6)
    {
        tick1 = 0;

        if (driver_button_struct.key_value == BUTTON1_PRESS_FLAG)
        {
            driver_button_struct.key_value = 0;
            modelListener->model_view(1, 1);
        }
        else if (driver_button_struct.key_value == BUTTON2_PRESS_FLAG)
        {
            driver_button_struct.key_value = 0;
            modelListener->model_view(1, 2);
        }
        else if (driver_button_struct.key_value == BUTTON3_PRESS_FLAG)
        {
            driver_button_struct.key_value = 0;
            modelListener->model_view(1, 3);
        }
        else
        {
            modelListener->model_view(2, table[0], table[1], table[2], table[3]);
            modelListener->model_view(3, 1, 65, 7, 7);
        }
        for (i = 0; i < 4; i++)
        {
            table[i]++;
            if (table[i] > 9999)
            {
                table[i] = 0;
            }
        }
    }
#endif
}
